<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class AddColFloorToUserAddressTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::table('user_address', function (Blueprint $table) {
            $table->integer("floor")->default(1)->comment("楼层");
            $table->integer("has_lift")->default(1)->comment("是否有电梯");
            $table->integer("type")->default(0)->comment("地址类型，0收货地址，1配送地址");
        });
        Schema::table('merchant_medicine', function (Blueprint $table) {
            $table->integer("water_num")->default(1)->comment("水数量")->after("goods_type");
        });
        Schema::table('order_address', function (Blueprint $table) {
            $table->integer("floor")->default(1)->comment("楼层");
            $table->integer("has_lift")->default(1)->comment("是否有电梯");
            $table->integer("type")->default(0)->comment("地址类型，0收货地址，1配送地址");
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::table('user_address', function (Blueprint $table) {
            //
        });
    }
}
